package com.china.produce.controller;

import com.china.produce.strategy.annotation.EvictionStrategyAnnotationFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2023/2/11
 */
@RequestMapping("/strategy")
@RestController
public class StrategyController {

    @Autowired
    private EvictionStrategyAnnotationFactory evictionFactory;

    @GetMapping("/test")
    public void test() {
        evictionFactory.getEviction("FIFO").evictionCache();

        evictionFactory.getEviction("FILO").evictionCache();
    }
}
